package com.zhaotianhao.springboot_demo_fire.controller;

import com.zhaotianhao.springboot.sendmail.common.MailResult;
import com.zhaotianhao.springboot.sendmail.service.MailSendService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;


/**
 * @Author Z-7
 * @Date 2022/3/23
 */
@RestController
@RequestMapping("/email")
public class SendEmail {
    @Autowired(required = false)
    private MailSendService mailSendService;

    @RequestMapping("/send")
    public MailResult sendMailMessage() {
        MailResult mailResult = mailSendService.sendMailMessage("薛凯", "--->邮件");
        return mailResult;
    }
}
